import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    active:4,
    item:"",
    Sshow:1,
  },
  getters: {
    Sshow_change(state){
      return state.Sshow
    },
    // 搜索商品
    // search_Goods(state){
    //   return state.search_goods
    // }
    // 购物车商品个数
    // Num_change(state){
    //   return state.num
    // }
  },
  mutations: {
    // 商品列表
    changeitem(state,payload){
      // console.log(payload);
      state.item = payload;
    },
    // 搜索展示
    Sshow(state,payload){
      state.Sshow = payload;
    },
    // 购物车商品个数
    // Num(state,payload){
    //   state.num = payload;
    // }
  },
  actions: {
  },
  modules: {
  }
})
